from pynput.mouse import Button, Controller
import time
import schedule

def disconnect():
    mouse = Controller()
    p = mouse.position
    mouse.position = (1193, 9)
    time.sleep(0.1)
    mouse.click(Button.left, 1)  
    mouse.position = (1270, 89)
    time.sleep(0.1)
    mouse.click(Button.left, 1) 
    mouse.position = p
    
def connect():
    mouse = Controller()
    p = mouse.position
    mouse.position = (1193, 9)
    time.sleep(0.1)
    mouse.click(Button.left, 1)  
    mouse.position = (1218, 101)
    time.sleep(0.1)
    mouse.click(Button.left, 1) 
    mouse.position = p

# schedule.every().day.at("07:55").do(disconnect)
schedule.every().day.at("08:05").do(connect)


while True:
    schedule.run_pending()
    time.sleep(0.5)
